package ballFinder.environment.sensors;

import lejos.nxt.SensorPort;
import lejos.nxt.addon.IRSeekerV2;
import lejos.nxt.addon.IRSeekerV2.Mode;

public class InfraredSensor {

	IRSeekerV2 seeker;
	
	public InfraredSensor(){
		seeker = new IRSeekerV2(SensorPort.S1,Mode.AC);
	}
	
	public boolean receiveSignal(){
		int direction = getDirection();
		if(direction > 0){
			return true;
		}
		return false;
	}
	
	public int getDirection() {
		return seeker.getDirection();
	}
}
